app.service('listSve', function ($http,$q,baseUrlAll) {
	var oUrl = baseUrlAll;
	//return baseUrl
    this.returnBase = function(){
	    return oUrl;
    }
   //房源列表
    this.hList = function(){
    	var baseUrl = oUrl+"hardware-service/api/house/list.json";
	    var service = {};
	    var hList = new baseService($http, $q, baseUrl);
	    return hList;
    }
    //导出xsl表格
    this.outList = function(){
    	var baseUrl =oUrl+"hardware-service/api/excel/houseExportByUnit.json";
	    return baseUrl;
    }
 //-------------------------------------------------------------------------//   
    
    //设备管理列表
    this.sList = function(){
    	var baseUrl = oUrl+"hardware-service/api/hardware/list.json";
//		var baseUrl = oUrl+"hardware-service/api/order/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
    //电量历史
    this.powerList = function(){
    	var baseUrl = oUrl+"hardware-service/api/ammeter/getElectricCounsumeInfo.do";
	    var service = {};
	    var powerList = new baseService($http, $q, baseUrl);
	    return powerList;
    }
     //电量状态
    this.doorList = function(){
    	var baseUrl = oUrl+"hardware-service/api/doorlock/status.do";
	    var service = {};
	    var powerList = new baseService($http, $q, baseUrl);
	    return powerList;
    }
      //清除所有密码
    this.doorClear = function(){
//  	var baseUrl = oUrl+"hardware-service/api/doorlock/clear.do";
    	var baseUrl = oUrl+"hardware-service/api/doorlock/clearPassword.json";
	    var service = {};
	    var powerList = new baseService($http, $q, baseUrl);
	    return powerList;
    }
      //开门记录
    this.doorClear_1 = function(){
    	var baseUrl = oUrl+"hardware-service/api/doorlock/getDookLockOpenInfo.json";
//  	var baseUrl = oUrl+"hardware-service/api/hardware/openLockLog.json";
	    var service = {};
	    var powerList = new baseService($http, $q, baseUrl);
	    return powerList;
    }
    //断电通电按钮
   this.powerLoop = function(){
    	var baseUrl = oUrl+"hardware-service/api/ammeter/control.do";
	    var service = {};
	    var powerList = new baseService($http, $q, baseUrl);
	    return powerList;
    }
   //在线通电状态
   this.zStatus = function(){
    	var baseUrl = oUrl+"hardware-service/api/ammeter/status.do";
	    var service = {};
	    var powerList = new baseService($http, $q, baseUrl);
	    return powerList;
    }
   //系统日志
    this.fList = function(){
    	var baseUrl = oUrl+"hardware-service/api/userLog/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
    
    //租客管理
    this.tenantList = function(){
    	var baseUrl = oUrl+"hardware-service/api/member/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
    
    //风控管理
    this.riskManagementList = function(){
    	var baseUrl = oUrl+"hardware-service/api/baidu_fk/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
    
    //登录
    this.loginList = function(){
    	var baseUrl = oUrl+"hardware-service/api/index/checkLogin.do";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //-----------------------------1.1.1新增接口--------------------------------------------//
   //电表门锁联网历史
   this.lineHistory = function(){
    	var baseUrl = oUrl+"hardware-service/api/onlinelog/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //门锁低电量历史
   this.lowPowHistory = function(){
    	var baseUrl = oUrl+"hardware-service/api/powerlog/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //取用户列表       
   this.roleList = function(){
    	var baseUrl = oUrl+"hardware-service/api/user/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //删除用户
   this.delRole = function(){
    	var baseUrl = oUrl+"hardware-service/api/user/batchDelete.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //取用户的权限、菜单、用户信息、角色等/hardware-service/api/index/index.json
   this.roleMsg = function(){
    	var baseUrl = oUrl+"hardware-service/api/index/index.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   ///hardware-service/api/user/save.json
   this.newSave = function(){
    	var baseUrl = oUrl+"hardware-service/api/user/save.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //获取所有用户角色
   this.rolesAll = function(){
    	var baseUrl = oUrl+"hardware-service/api/user/roles.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //-----------------------------1.1.2新增接口--------------------------------------------//
    //获取所有供应商
   this.supplierList = function(){
    	var baseUrl = oUrl+"hardware-service/api/suppllierproduct/all.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
    //创建门锁
   this.setupDoor = function(){
    	var baseUrl = oUrl+"hardware-service/api/house/generateDoorlock.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //创建电表
   this.setupAmmeter = function(){
    	var baseUrl = oUrl+"hardware-service/api/house/generateAmmeter.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
   //创建设备管理列表
    this.cList = function(){
//  	var baseUrl = oUrl+"hardware-service/api/hardware/list.json";/hardwareInstallOrder/add.json 
		var baseUrl = oUrl+"hardware-service/api/hardwareInstallOrder/list.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
    //-----------------------------17.5.27新增接口--------------------------------------------//
    //http://121.40.178.164:9090/hardware-service/api/house/detail.json?districtId=321
    this.oDetail = function(){
    	var baseUrl = oUrl+"hardware-service/api/house/detail.json";
	    var service = {};
	    var sList = new baseService($http, $q, baseUrl);
	    return sList;
    }
    
})